package net.xgclass.online_xgclass.mapper;

import net.xgclass.online_xgclass.model.entity.Chapter;
import net.xgclass.online_xgclass.model.entity.Episode;
import net.xgclass.online_xgclass.model.entity.Video;
import net.xgclass.online_xgclass.model.entity.VideoBanner;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface VideoMapper{

    /**
     * 查询视频列表
     * @return
     */
    List<Video> listVideo();

    /**
     * 首页轮播图列表
     * @return
     */
    List<VideoBanner> listVideoBanner();

    /**
     * 查询视频详情
     * @param videoId
     * @return
     */
    Video findDetailById(@Param("video_id") int videoId);

    /**
     * 简单查询视频信息
     * @param videoId
     * @return
     */
    Video findById(@Param("video_id") int videoId);

    List<Video> listVideoDetail();

    List<Video> videoPageInfo(int pagenum, int pagesize);

    int addVideo(Video video);

    Video queryVideo();

    List<Chapter> queryChaEpiByVideoId(Integer videoId);

    int addChapter(Chapter chapter);

    int addEpisode(Episode episode);

    List<VideoBanner> videoBannerPageInfo(int pagenum, int pagesize);

    int editCourse(Video video);

    int removeCourse(Integer id);

    int removeChapter(Integer id);

    int removeEpisode(Integer id);

    int editChapter(Chapter chapter);

    int removeEpisodeByChapterId(Integer id);

    int removeChapterByChapterId(Integer id);

    int removeEpisodeByEpisodeId(Integer id);

    int editEpisode(Episode episode);

    int addBanner(VideoBanner videoBanner);

    int editBanner(VideoBanner videoBanner);

    int removeBanner(Integer id);
}
